-
Notifications
You must be signed in to change notification settings - Fork 175
Add tls #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add tls #831
Conversation
@guha-rahul : Thank you so much for making key additions to the TLS PR. Reviewed them. Please try and resolve CI/CD issues. Did a re-run of the CI/CD pipeline. Looking forward to seeing TLS in production stage in the coming week. Appreciate your efforts. |
@guha-rahul : This is excellent progress—great to see TLS coming together for py-libp2p! 🎉 This is indeed a big step forward for strengthening security in the stack. Having TLS fully integrated not only ensures encrypted transport but also provides identity guarantees that will be really valuable for interoperability with other libp2p implementations. Wish to share that I am reviewing the PR in detail and will share feedback soon. Will encourage @lla-dane to share feedback too. Wish to share some pointers as you continue in completing this key addition to py-libp2p:
Appreciate your initiative and efforts here. TLS is foundational, and your work is laying the groundwork for more secure and production-ready networking in py-libp2p. Looking forward to reviewing the code and tests as they land. Will share feedback soon. |
@guha-rahul : Re-ran the CI/CD pipeline. 1 test case is failing. Please try and resolve it. Great progress. |
@guha-rahul : Thank you for your progress in TLS Pr. Lets arrive at a good conclusion to it this week. |
with tempfile.NamedTemporaryFile("w", delete=False) as cert_file: | ||
cert_file.write(self._cert_pem) | ||
cert_path = cert_file.name | ||
with tempfile.NamedTemporaryFile("w", delete=False) as key_file: | ||
key_file.write(self._key_pem) | ||
key_path = key_file.name | ||
ctx.load_cert_chain(certfile=cert_path, keyfile=key_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it might be leaving these tempfiles floating around with sensitive data in them. Can we explicitly delete them after loading?
Public key from libp2p extension | ||
|
||
Raises: | ||
SecurityError: If verification fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring says it raises SecurityError
, but only ValueErrors
show up in the function.
What was wrong?
Py-libp2p does not have TLS. Builds on top of #700
How was it fixed?
Summary of approach.
To-Do
TLS architecture diagram